Unity gameobject visible to specific camera

74

Unity gameobject visible to specific camera -

using UnityEngine;
 
public class TestRendered : MonoBehaviour
{	
	void Update()
	{
		if (renderer.IsVisibleFrom(Camera.main)) Debug.Log("Visible");
		else Debug.Log("Not visible");
	}
}

Comments

Submit
0 Comments